package com.dao.qsl;

import com.util.qsl.Dbutil;
import org.springframework.stereotype.Repository;

import java.sql.Connection;
import java.sql.PreparedStatement;

@Repository
public class ShanChu {
      public Boolean sc(int bh){
	  Dbutil d=new Dbutil();
	  Connection c=null;
	  try {
	        c=d.getConnection();
	        String sql="DELETE  from service WHERE fwbh=?";
	        PreparedStatement pr =c.prepareStatement(sql);
	        pr.setInt(1,bh);

	        int i=pr.executeUpdate();
	        if (i>0){
		    return  true;
	        }else {
		    return false;
	        }
	  }catch(Exception e){
	        e.printStackTrace();
	  }
	  return false;
      }
}
